<template>
  <div class="about">
    <Menu/> 
    <h1>This is an about page</h1>
    <div>
        <img src="@/assets/img/logo.png" alt="" srcset="">
    </div>
    <div>
     <div class="block">
    <span class="demonstration">默认 Hover 指示器触发</span>
    <el-carousel height="150px">
      <el-carousel-item v-for="(item,index) in imglist" :key="index">
        <img :src="item.url">
      </el-carousel-item>
    </el-carousel>
  </div>
    </div>
  </div>
</template>

<script>
// @ is an alias to /src
import Menu from '@/components/Menu.vue'

export default {
  name: 'About',
  components: {
    Menu
  },
  data(){
     return {
       //图片存放在vue项目的本地路径下，图片及文件的路径前面要加require
       //后端数据传递过来的图片路径，不需要加require
    imglist:[
      {url: require('@/assets/img/001.jpg')},
      {url: require('@/assets/img/002.jpg')},
      {url: require('@/assets/img/003.jpg')},
      {url: require('@/assets/img/004.jpg')}
    ]
     }
  }
}
</script>

<style lang="postcss">
.block{
  border: 1px solid #666;
}
</style>